<template>
    <div id="OrderdetailSO2">
        <v-details :detailData="inputData" :inputConfig="inputConfig" :rules="rules"></v-details>
    </div>
</template>

<script>
    import details from 'commons/Detail'
    import baseMixin from "@/mixins/BaseMixin";

    export default {
        name: "OrderdetailSO2",
        mixins: [baseMixin],
        props: {
            inputData: {
                type: Object
            }
        },
        data() {
            return {
                inputConfig: [
                    [
                        {
                            type: "input",
                            label: this.$t('outbound.userlinenumber'),
                            props: "orderlinenumber",
                            disabled: true
                        },
                        {
                            type: "input",
                            label: this.$t('out.originallinenumber'),
                            props: "originallinenumber",
                        },
                        {
                            type: "input",
                            label: this.$t('out.originalsku'),
                            props: "originalsku",
                        },
                        {
                            type: "input",
                            label: this.$t('in.cubicmeter'),
                            props: "cubicmeter",
                        },
                        {
                            type: "input",
                            label: this.$t('in.hundredweight'),
                            props: "hundredweight",
                        },
                    ],
                    [
                        {
                            type: "select",
                            label: this.$t('config.allocaStrategy'),
                            props: "newallocationstrategy",
                            options: this.getOptions("queryNewallocationstrategyDropDown")
                        },
                        {
                            type: "select",
                            label: this.$t('out.preallocatestrategykey'),
                            props: "preallocatestrategykey",
                            options: this.getOptions("queryPreallocatestrategyDropDown")
                        },
                        {
                            type: "select",
                            label: this.$t('config.strategykey'),
                            props: "allocatestrategykey",
                            options: this.getOptions("queryAllocatestrategyDropDown")
                        },
                        {
                            type: "select",
                            label: this.$t('out.allocatestrategytype'),
                            props: "allocatestrategytype",
                            options: this.getOptions("querycodeLkup/ALLOCTYPE")
                        },
                        {
                            type: "input",
                            label: this.$t('out.buyerpo'),
                            props: "buyerpo",
                        },
                        {
                            type: "input",
                            label: this.$t('out.unitprice'),
                            props: "unitprice",
                        },
                        {
                            type: "date",
                            label: this.$t('in.effectivedate'),
                            props: "effectivedate",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('out.shelflife'),
                            props: "shelflife",
                            disabled: true
                        },
                        {
                            type: "select",
                            label: this.$t('outbound.rotation'),
                            props: "rotation",
                            options: this.getOptions("querycodeLkup/ROTATION")
                        },
                        {
                            type: "select",
                            label: this.$t('config.rotateby'),
                            props: "skurotation",
                            options: this.getOptions("querycodeLkup/SKUROTATE")
                        },
                        {
                            type: "select",
                            label: this.$t('config.dapicksort'),
                            props: "dapicksort",
                            options: this.getOptions("querycodeLkup/DAPICKSORT")
                        },
                        {
                            type: "checkbox",
                            label: this.$t('out.issubstitute'),
                            props: "issubstitute",
                        },
                        {
                            type: "checkbox",
                            label: this.$t('out.oktosubstitute'),
                            props: "oktosubstitute",
                        },
                        {
                            type: "checkbox",
                            label: this.$t('out.opprequest'),
                            props: "opprequest",
                        },
                    ],
                    [
                        {
                            type: "input",
                            label: this.$t('out.workorderkey'),
                            props: "workorderkey",
                        },
                        {
                            type: "select",
                            label: this.$t('out.linetype'),
                            props: "linetype",
                            options: this.getOptions("querycodeLkup/SOLINETYPE")
                        },
                        {
                            type: "input",
                            label: this.$t('out.componentqty'),
                            props: "componentqty",
                        },
                    ]
                ],
                rules: {
                    orderlinenumber: [
                        {required: true, trigger: 'blur'},
                    ],
                    shelflife: [
                        {required: true, trigger: 'blur'},
                    ]
                },
            }
        },
        methods: {},
        mounted() {
        },
        watch: {},
        components: {
            'v-details': details
        }
    }
</script>

<style scoped>

</style>
